﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>塔城地区公共就业信息有务网_个人用户登录</title>
<link href="../common/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../common/css/reset.css" />
<link href="../common/css/pageCode.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="../js/jquery.page.js"></script>
<script type="text/javascript">
	$(function(){
		
		$(".tcdPageCode").createPage({
			pageCount:6,  //总页数
			current:1,    //当前页
			backFn:function(p){
				//alert(p);
				console.log(p);
				//单击回调方法，p是当前页码
			}
		});
		
		//全选
		$(function(){
			 $("#checkboxAll").click(function() {
				   $("[name=checkbox]:checkbox").attr("checked", this.checked);
			 });
		});
		function searchRecruit(){
            $.ajax({
                url:"searchRecruit.action",
                type:"post",
                headers:{
                    token:window.sessionStorage.getItem("token")
                },
                dataType:"json",
                data:{
                    dwmc:null,
                    gwmc:null,
                    xlyq:null,
                    gzdd:null,
                    min:null,
                    max:null
                },
                success:function (recruitList) {
                    $("#t").empty();
                    $("#t").append("<tr>\n" +
                        "                <th>&nbsp;</th>\n" +
                        "                <th>单位名称</th>\n" +
                        "                <th>岗位名称</th>\n" +
                        "                <th>发布时间</th>\n" +
                        "                <th>招聘人数</th>\n" +
                        "                <th>学历要求</th>\n" +
                        "                <th>工作地点</th>\n" +
                        "\t\t\t\t<th>详情</th>\n" +
                        "              </tr>");
                    $.each(recruitList,function (key,recruit) {
                        var str="<tr id='tr_"+recruit.id+"'>\n" +
                            "                <td><input type=\"checkbox\" name=\"checkbox\" id=\"checkbox\" value='"+recruit.id+"' /></td>\n" +
                            "                <td>"+recruit.dwmc+"</td>\n" +
                            "                <td>"+recruit.gwmc+"</td>\n" +
                            "                <td>"+recruit.createTime+"</td>\n" +
                            "                <td>"+recruit.zprs+"</td>\n" +
                            "                <td>"+recruit.xlyq+"</td>\n" +
                            "                <td>"+recruit.gzdd+"</td>\n" +
                            "\t\t\t\t<td><a href=\"gr_recruit_des.html?id="+recruit.id+"\">查看</a></td>\n" +
                            "              </tr>";
                        $("#t").append(str);
                    })
                }
            });
        }
        searchRecruit()
        //搜索岗位
        $("#but1").click(function () {
            var dwmc=$("#dwmc").val();
            var gwmc=$("#gwmc").val();
            var xlyq=$("#xlyq").val();
            var gzdd=$("#gzdd").val();
            var min=$("#min").val();
            var max=$("#max").val();

            $.ajax({
                url:"searchRecruit.action",
                type:"post",
                headers:{
                    token:window.sessionStorage.getItem("token")
                },
                dataType:"json",
                data:{
                    dwmc:dwmc,
                    gwmc:gwmc,
                    xlyq:xlyq,
                    gzdd:gzdd,
                    min:min,
                    max:max
                },
                success:function (recruitList) {
                    $("#t").empty();
                    $("#t").append("<tr>\n" +
                        "                <th>&nbsp;</th>\n" +
                        "                <th>单位名称</th>\n" +
                        "                <th>岗位名称</th>\n" +
                        "                <th>发布时间</th>\n" +
                        "                <th>招聘人数</th>\n" +
                        "                <th>学历要求</th>\n" +
                        "                <th>工作地点</th>\n" +
                        "\t\t\t\t<th>详情</th>\n" +
                        "              </tr>");
                    $.each(recruitList,function (key,recruit) {
                        var str="<tr id='tr_"+recruit.id+"'>\n" +
                            "                <td><input type=\"checkbox\" name=\"checkbox\" id=\"checkbox\" value='"+recruit.id+"' /></td>\n" +
                            "                <td>"+recruit.dwmc+"</td>\n" +
                            "                <td>"+recruit.gwmc+"</td>\n" +
                            "                <td>"+recruit.createTime+"</td>\n" +
                            "                <td>"+recruit.zprs+"</td>\n" +
                            "                <td>"+recruit.xlyq+"</td>\n" +
                            "                <td>"+recruit.gzdd+"</td>\n" +
                            "\t\t\t\t<td><a href=\"gr_recruit_des.html?id="+recruit.id+"\">查看</a></td>\n" +
                            "              </tr>";
                        $("#t").append(str);
                    })
                }
            });
        });
	});

	//收藏
	function addCollect() {
        var recruitIds="";
        $("input[name=checkbox]:checked").each(function () {
            recruitIds+=this.value+",";
        });
        if(recruitIds==""){
            alert("至少选择一项");
            return;
        }
        recruitIds+="0";

        $.ajax({
            url:"addCollect.action",
            type:"post",
            headers:{
                token:window.sessionStorage.getItem("token")
            },
            data:{
                recruitIds:recruitIds
            },
            success:function (data) {
                if(data>0){
                    alert("收藏成功")
                }else{
                    alert("收藏失败")
                }
            }
        });
    }

    //投递
    function addRecruitResume() {
        var recruitIds="";
        $("input[name=checkbox]:checked").each(function () {
            recruitIds+=this.value+",";
        });
        if(recruitIds==""){
            alert("至少选择一项");
            return;
        }
        recruitIds+="0";

        $.ajax({
            url:"addRecruitResume.action",
            type:"post",
            headers:{
                token:window.sessionStorage.getItem("token")
            },
            data:{
                recruitIds:recruitIds
            },
            success:function (data) {
                if(data==-1){
                    alert("简历完善度小于70%,不可投递简历，请完善！");
                }else if(data>0){
                    alert("投递成功");
                    var arr=recruitIds.split(",");
                    $.each(arr,function (key,id) {
                        $("#tr_"+id).remove();
                    })
                }else{
                    alert("投递失败")
                }
            }
        });
    }
</script>
</head>

<body>
<div class="ban2">
    <div class="nav1">
    	<P><span>马力，欢迎登录！</span>  |  <a href="javascript:void(0);" id="updatePassword">修改密码</a>  |  <a href="#">退出</a></P>
        <ul>
            <li><a href="gr_index.html">个人首页</a></li>
            <li><a href="gr_recruit_search.html">职位搜索</a></li>
            <li><a href="gr_recruit_collect.html">岗位收藏</a></li>
            <li><a href="gr_jobhuntinglog.html">求职记录</a></li>
        </ul>
    </div>
</div>

<div class="main mt12">
    <div id="gr_left"></div>
	<div class="fr w795">
        <div class="yh-tit"><strong>基本信息 </strong><span style="color:red;font-weight:bold;font-size:20px">搜索的岗位为15天之外投递的岗位信息，即15天之内只允许投递一个简历</span></div>
        <div class="yh-nr">
        	<div class="yh-ss">
            	<ul>
                	<li><label>单位名称：</label><input type="text" id="dwmc" /></li>
                    <li><label>岗位名称：</label><input type="text" id="gwmc"/></li>
                    <li><label>学历要求：</label><input type="text" id="xlyq"/></li>
                    <li><label>工作地点：</label><input type="text" id="gzdd"/></li>
                    <li><label>最低薪资：</label><input type="text" id="min"/></li>
                    <li><label>最高薪资：</label><input type="text" id="max"/></li>
                </ul>
                <p><input name="" type="button" id="but1" class="ssbtn" value="搜  索" /><input name="" type="button" class="ssbtn" value="重  置" /></p>
            </div>
            
            <table border="0" cellspacing="0" cellpadding="0" id="t" class="zwlb">
              <tr>
                <th>&nbsp;</th>
                <th>单位名称</th>
                <th>岗位名称</th>
                <th>发布时间</th>
                <th>招聘人数</th>
                <th>学历要求</th>
                <th>工作地点</th>
				<th>详情</th>
              </tr>
              <tr>
                <td><input type="checkbox" name="checkbox" id="checkbox" /></td>
                <td>塔城地区人力资源</td>
                <td>会员维护拓展专员</td>
                <td>2021-10-31</td>
                <td>2</td>
                <td>大专</td>
                <td>上海</td>
				<td><a href="gr_recruit_des.html">查看</a></td>
              </tr>
              <tr>
                <td><input type="checkbox" name="checkbox" id="checkbox" /></td>
                <td>塔城地区人力资源</td>
                <td>会员维护拓展专员</td>
                <td>2021-10-31</td>
                <td>2</td>
                <td>大专</td>
                <td>上海</td>
				<td><a href="gr_recruit_des.html">查看</a></td>
              </tr>
              <tr>
                <td><input type="checkbox" name="checkbox" id="checkbox" /></td>
                <td>塔城地区人力资源</td>
                <td>会员维护拓展专员</td>
                <td>2021-10-31</td>
                <td>2</td>
                <td>大专</td>
                <td>上海</td>
				<td><a href="gr_recruit_des.html">查看</a></td>
              </tr>
              <tr>
                <td><input type="checkbox" name="checkbox" id="checkbox" /></td>
                <td>塔城地区人力资源</td>
                <td>会员维护拓展专员</td>
                <td>2021-10-31</td>
                <td>2</td>
                <td>大专</td>
                <td>上海</td>
				<td><a href="gr_recruit_des.html">查看</a></td>
              </tr>
              </table>
			  <br>
              <table border="0" cellspacing="0" cellpadding="0" class="num">
              <tr>
                <td width="50%"><input type="checkbox" name="checkboxAll" id="checkboxAll" />&nbsp;&nbsp;全选 | <a href="javascript:addRecruitResume();">申请选中职位</a> | <a href="javascript:addCollect();">放入职位收藏夹</a></td>
              </tr>
			  <tr>
                <td>
                  <!--<div class="list_page"><p><a href="#"><img src="images/list_pape_left.gif" /></a><span>1</span><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#"><img src="images/list_pape_right1.jpg" /></a><a href="#"><img src="images/list_pape_top.jpg" /></a></p></div>-->
				  <div class="tcdPageCode"></div>
        		</td>
              </tr>
             </table>

        </div>
        
    </div>
</div>
<div class="foot">
    <ul>
      相关网站导航：<select name="menu1" onchange="MM_jumpMenu('parent',this,0)" style="margin-left:20px;display:inline;">
          <option>-- 自  治 区 政 府 部 门 --</option>
        </select> 
        <select name="menu2" onchange="MM_jumpMenu('parent',this,0)" style="margin-left:20px;display:inline;">
          <option>-- 地 州 网  站 --</option>
        </select>
            <select name="menu3" onchange="MM_jumpMenu('parent',this,0)" style="margin-left:20px;display:inline;">
              <option>--主 要  新 闻  媒  体 --</option>
            </select>
            <select name="menu4" onchange="MM_jumpMenu('parent',this,0)" style="margin-left:20px;display:inline;">
              <option>-- 主 要 门 户 及 合 作 网 站 --</option>
            </select>
      </ul>
    
    <p>主办单位：塔城地区人力资源和社会保障局<br />技术支持：塔城地区人力资源和社会保障局信息化办公室</p>
</div>
</body>
</html>
